import Todo from '../views/todo/todo.vue'
import Login from '../views/login/login.vue'

export default [{
        component: Todo,

        // /app/:id params的参数时候 直接页面中props就可以获取
        // props: true,
        // path: '/app/:id',

        // path: '/app',
        // props: {
        //     name: 'zhooson'
        // },

        // path: '/app',
        // props: (route) => ({
        //     query: route.query.q
        // }),

        path: '/app',

        beforeEnter: (to, from, next) => {
            console.info('router beforeEnter')
            next()
        }
    },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/',
        redirect: '/app'
    }
]